home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2000 #5 / Amiga Plus CD - 2000 - No. 5.iso / Tools / DFUE / AmiTradeCenter / Install < prev    next >
Text File  |  2000-01-01  |  36KB  |  1,049 lines

  1. ; $VER: Installer Script for AmiTradeCenter V1.5 (30.07.00) by <Ingo@night.de>
  2. ; I tell you: writing installer scripts is a real pain!
  3. ; Especially if you don`t know what you are doing ;^)
  4. ;
  5. ; V1.5 - NListtree.mcc stuff kicked
  6. ;
  7. ; V1.4 - we decided to use other icons in order to polish up
  8. ;        (as promised in the ml) the next release ;) 
  9. ;        Therefore some changes has been made in atc_copyicons()
  10. ;      - I decided that new icons are not enough and changed the
  11. ;        background of the installerscreen (if you use any) as well ;)
  12. ;      - added first and lastmessage for initial installation
  13. ;
  14. ; V1.3 - made some procedures to gain some bytes, it`s not finished yet
  15. ;        but worx ok though. I continue this later.
  16. ;      - made a new icon for OS3.1 and changed the script to copy the right
  17. ;        icon while installing on OS3.1. IconEdit is sorta crazy though, i have
  18. ;        made the drawers and 2 Server/Trader.info only. IconEdit is somewhat
  19. ;        buggy i think and it`s really no fun to put oldstyle icons into
  20. ;        Glowicons. Zum Abgewöhnen! ;)
  21. ;      - due to a new introduced envvar the installer will now set the
  22. ;        path, where atc is located, as default for updates.
  23. ;
  24. ;        NOTE: This will work from the _next_ release because the var is
  25. ;              not available right now. Next time it`s there if you start
  26. ;              ATC in the meantime (of coz) ;)
  27. ;
  28. ;      - fixed this iconcopy crap - no more icons are copied while installing
  29. ;        an update. Sorry Marcin, i didn`t knew that the icons are overwritten
  30. ;        all the time and you didn`t made it very clear to me or i didn`t
  31. ;        understand it correctly. It will _never_ happen again ;-)
  32. ;
  33. ; V1.2 - added ATCTrader.info (selected ATC icon becomes ATCTrader icon as well)
  34. ;
  35. ; V1.1 - changed cataloghandling to use pattern instead of filenames
  36. ;
  37. ; V1.0 - added swedish language to installscript and support for swedish catalogs
  38. ;        smörebröd ;)
  39. ;      - You can now read english or german guide - this was changed because
  40. ;        guys from Austria or Switzerland probably want to read the german guide.
  41. ;        I`m not sure if their env:language point to 'deutsch'.
  42. ;
  43. ; V0.9 - added french language to installscript and support for french catalogs
  44. ;
  45. ; V0.8 - redesigned the script so that all things that must be selected
  46. ;        (catalogs and icons for the moment) can be selected before any
  47. ;        file is copied
  48. ;      - installpictures are no longer copied to the users disk
  49. ;
  50. ; V0.7 - catalogs can now be selected by user
  51. ;      - added handling of New and Glowicons
  52. ;
  53. ; V0.6 - small icons added
  54. ;      - changed pattern for installarchives so that .profiles and .config
  55. ;        are no longer overwritten if ultra decide to release an installarchive
  56. ;      - Moved Install-GUI to the bottom of the screen
  57. ;
  58. ; V0.5 - made some changes to use one script for install and update
  59. ;
  60. ; V0.4 - added NListTree.mcc stuff
  61. ;
  62. ; V0.3 - open window on WB, where atc was installed, automatically
  63. ;
  64. ; V0.2 - changed some pattern
  65. ;
  66. ; V0.1 - first usable script
  67.  
  68. (set #language (getenv "Language"))
  69.  
  70. (if (= #language "deutsch")
  71.   (
  72.     (set #minInst43 "Du brauchst Installer Version 43 oder höher\num AmiTradeCenter zu Installieren.\nLebst Du hinterm Mond? ;)")
  73.     (set #askdir "Wo soll ATC installiert werden?\nEin neues Verzeichnis `AmiTradeCenter` wird ggf. dort hingezaubert (zing).")
  74.     (set #askdir1 "Wo befindet sich ATC auf deinem System?\nBitte den kompletten Pfad,\ninklusive /AmiTradeCenter, anwählen!")
  75.     (set #asl_help "Bitte den Pfad auswählen wo sich ATC befindet.")
  76.     (set #makedir_help "Erzeuge neues Verzeichnis..")
  77.     (set #firstmessage (cat "\nHalli Hallo bei AmiTradeCenter, dem FTP-Client für Amiga Computer. Das ATC-Development-Council(tm) wünscht Dir viel Spaß bei der Benutzung dieser Software, Du solltest dir die Zeit nehmen um die Anleitung zu Lesen falls Du auf unerwartete Probleme triffst oder eine Funktion für Dich unklar ist. ;-)"))
  78.     (set #lastmessage (cat "\nDie Installation hat problemlos geklappt (ein wunder wenn Du mich fragst..), jetzt kannst Du richtig loslegen. Damit Du ATC sofort Starten kannst, wurde schon mal das Fenster auf der Workbench geöffnet (nett ne?) :-) Du kannst jetzt, nachdem du auf weiter geklickt hast, einen Blick in die Anletung riskieren wenn Du willst (sehr zu Empfehlen)."))
  79.     (set #copyfiles "Kopiere Dateien..")
  80.     (set #copy_help "Dateien werden jetzt Kopiert..")
  81.     (set #yourchoice "\nWelches Icon darf`s denn sein?.\n\n")
  82.     (set #your_help "Dieses Icon wird als Standard-Icon in den Pfad geschmiert.")
  83.     (set #showguide (cat "\n\nWelche Anleitung willst Du jetzt Lesen?\n"))
  84.     (set #guide_help "Falls Du nicht lesen kannst, vergiß diesen Punkt ;-)")
  85.     (set #showguide-1 (cat "Na klar.."))
  86.     (set #showguide-2 (cat "Och nö.."))
  87.     (set #guideD "docs/AmiTradeCenter_D.guide")
  88.     (set #guideE "docs/AmiTradeCenter_E.guide")
  89.     (set #none "Am liebsten gar keine")
  90.     (set #installchoice "\nWie willst Du ATC auf deine Platte Brennen?\n!")
  91.     (set #inst_help "\nWie willst Du ATC auf deine Platte Brennen?\n")
  92.     (set #detect "\nAmiTradeCenter ist auf diesem\nSystem bereits Installiert.\n\n")
  93.     (set #NList_new "Zu installierende Version: 17.53\n")
  94.     (set #NList_help "MUI-Class NListTree.mcc nach Mui:libs/mui/ Kopieren")
  95.     (set #NListCopy "Soll die MUI-Class NListTree.mcc nach Mui:libs/mui/NListTree.mcc kopiert werden?\n\n")
  96.     (set #NListCopy-1 (cat "Logo"))
  97.     (set #NListCopy-2 (cat "Alles, nur das nicht!"))
  98.     (set #cat_help "Welche Sprache möchtest Du benutzen?")
  99.     (set #cat "catalogs")
  100.     (set #catDE "catalogs/deutsch")
  101.     (set #catFR "catalogs/français")
  102.     (set #catSW "catalogs/svenska")
  103.     (set #catEN "catalogs/english")
  104.     (set #whichicon "Welche Piktogramme möchtest Du installieren?")
  105.     (set #glow1 "Glowicons / Oldstyle")
  106.     (set #glow2 "Newicons")
  107.     (set #cat1 "deutsch")
  108.     (set #cat2 "französisch")
  109.     (set #cat3 "schwedisch")
  110.     (set #cat4 "englisch")
  111.     (set #icon1 "Piktogramm 1")
  112.     (set #icon2 "Piktogramm 2")
  113.     (set #icon3 "Piktogramm 3")
  114.     (set #icon4 "Piktogramm 4")
  115.     (set #NList_version (getversion "mui:libs/mui/NListTree.mcc"))
  116.     (set #NList_ver (/ #NList_version 65536))
  117.     (set #NList_rev (- #NList_version (* #NList_ver 65536)))
  118.     (set #NList_text (cat "\nInstallierte Version:" #NList_ver"."#NList_rev))
  119.   )
  120.   (
  121.     (if (= #language "français")
  122.       (
  123.         (set #minInst43 "Il te faut l'Installer Version 43 ou plus\npour installer AmiTradeCenter.")
  124.         (set #askdir "OÙ veux-tu installer ATC?\nUn nouveau répertoire `AmiTradeCenter` sera créé.")
  125.         (set #askdir1 "OÙ est ATC sur ton système?\nIndique-moi le chemin complet,\nincluant /AmiTradeCenter!")
  126.         (set #asl_help "Sélectionne le chemin oÙ se trouve ATC.")
  127.         (set #makedir_help "Création du nouveau répertoire..")
  128.         (set #firstmessage (cat "\nBonjour et bienvenue dans AmiTradeCenter, le client FTP pour Amiga. Toute l'équipe de développement d'ATC(tm) te souhaite bien du plaisir en utilisant ce programme. Prends-toi le temps de lire le manuel en cas de problèmes ou si quelquechose te semble étrange ;-)"))
  129.         (set #lastmessage (cat "\nL'installation s'est deroulé sans problèmes (un miracle à mon avis..), tu peux maintenant démarrer ATC. Pour utiliser ATC, le plus vite possible, la fenêtre (sur le Workbench) oÙ ATC a été insatllé est maintenant ouverte. Tu as la possibilité de lire le guide en cliquant sur le boutton Continuer."))
  130.         (set #copyfiles "Copie fichier..")
  131.         (set #copy_help "Copie les fichiers..")
  132.         (set #yourchoice "\nQuelles icônes veux-tu utiliser?.\n\n")
  133.         (set #your_help "Les icônes que tu veux utiliser pour ATC.")
  134.         (set #showguide (cat "\n\nVeux-tu jetter un coup d'oeil dans le guide d'ATC?\n"))
  135.         (set #guide_help "Au cas ou tu ne saurais pas lire, passe cette partie ;-)")
  136.         (set #showguide-1 (cat "Oui bien sur.."))
  137.         (set #showguide-2 (cat "Ha non.."))
  138.         (set #guideD "docs/AmiTradeCenter_D.guide")
  139.         (set #guideE "docs/AmiTradeCenter_E.guide")
  140.         (set #none "Hum, aucun! ;)")
  141.         (set #installchoice "\nComment veux-tu qu'ATC soit installé sur ton disque dur?\n!")
  142.         (set #inst_help "\nComment veux-tu qu'ATC soit installé sur ton disque dur?\n")
  143.         (set #detect "\nAmiTradeCenter est déjà installé\nsur ton système.\n\n")
  144.         (set #NList_new "Version a installer: 17.53\n")
  145.         (set #NList_help "Copie MUI-Class NListTree.mcc dans Mui:libs/mui/")
  146.         (set #NListCopy "Est-ce NListTree.mcc doit être copier en Mui:libs/mui/NListTree.mcc?\n\n")
  147.         (set #NListCopy-1 (cat "Bien Sur"))
  148.         (set #NListCopy-2 (cat "Tout, mais pas ça!"))
  149.         (set #cat_help "Quelle langue veux-tu utiliser?")
  150.         (set #cat "catalogs")
  151.         (set #catDE "catalogs/deutsch")
  152.         (set #catFR "catalogs/français")
  153.         (set #catSW "catalogs/svenska")
  154.         (set #catEN "catalogs/english")
  155.         (set #whichicon "Quelles icônes désires-tu installer?")
  156.         (set #glow1 "Glowicons / Oldstyle")
  157.         (set #glow2 "Newicons")
  158.         (set #cat1 "Allemagne")
  159.         (set #cat2 "Français")
  160.         (set #cat3 "Suédois")
  161.         (set #cat4 "Anglais")
  162.         (set #icon1 "icônes 1")
  163.         (set #icon2 "icônes 2")
  164.         (set #icon3 "icônes 3")
  165.         (set #icon4 "icônes 4")
  166.         (set #NList_version (getversion "mui:libs/mui/NListTree.mcc"))
  167.         (set #NList_ver (/ #NList_version 65536))
  168.         (set #NList_rev (- #NList_version (* #NList_ver 65536)))
  169.         (set #NList_text (cat "\nVersion installée:" #NList_ver"."#NList_rev)) 
  170.       )
  171.       (
  172.         (if (= #language "svenska")
  173.           (
  174.             (set #minInst43 "Du behöver minst Installer version 43 eller högre\nför att installera AmiTradeCenter. Var kommer du ifrån? ;)")
  175.             (set #askdir "Var vill du installera ATC?\nEn ny katalog kommer att skapas... på något sätt ;)")
  176.             (set #askdir1 "Var är ATC installerat på ditt system?\nVälj hela sökvägen, inkl. /AmiTradeCenter!")
  177.             (set #asl_help "Välj sökvägen till ATCs nuvarande installationskatalog.")
  178.             (set #makedir_help "Skapar katalog...")
  179.             (set #firstmessage (cat "\nHej och välkommen till AmiTradeCenter (ATC), FTP-klienten för Amiga-datorer. ATCs utvecklingsråd (ATC-Development-Council (tm)) hoppas att du har mycket skoj när du använder denna mjukvara. Du bör ta en stund till att läsa manualen om du stöter på oväntade problem eller om en funktion verkar konstig. :-)"))
  180.             (set #lastmessage (cat "\nInstallationen gick utan problem (ett smärre mirakel om du frågar mig...) och du kan nu starta ATC. För att du ska kunna använda ATC direkt har lådan som ATC är installerats i öppnats på din Workbench. Du kan nu läsa manualen efter att ha klickan på knappen Fortsätt."))
  181.             (set #firstmessage (cat "\nHello and welcome to AmiTradeCenter, the FTP-Client for Amiga Computers. The ATC-Development-Council(tm) wishes you a lot of fun while using this Software, you should take a moment to read the manual if you encounter unexpected problems or a function seem to be strange for you ;-)"))
  182.             (set #lastmessage (cat "\nInstallation worked without problems (a miracle if you ask me..), you can now start ATC. In order to use ATC as fast as possible the window (on the Workbench) where ATC was installed is opened already. You have the possibility to study the guide after you have clicked the proceed button."))
  183.             (set #copyfiles "Kopierar filer...")
  184.             (set #copy_help "Kopierar filer...")
  185.             (set #yourchoice "Vilken ikon vill du använda?")
  186.             (set #your_help "Du måste använda den här ikonen med ATC varje dag. Tänk efter ordentligt! ;)")
  187.             (set #showguide (cat "\n\nVilken ATC-guide vill du läsa nu?\n"))
  188.             (set #guide_help "Om du inte kan läsa, kan du ignorera detta avsnitt ;)")
  189.             (set #showguide-1 (cat "Visst.."))
  190.             (set #showguide-2 (cat "Inte egentligen.."))
  191.             (set #guideD "docs/AmiTradeCenter_D.guide")
  192.             (set #guideE "docs/AmiTradeCenter_E.guide")
  193.             (set #none "Öhrm, ingen alls, så klart! ;)")
  194.             (set #installchoice "\nHur vill du att ATC ska installeras?\n")
  195.             (set #inst_help "\nHur vill du att ATC ska installeras?\n")
  196.             (set #detect "\nAmiTradeCenter är redan installerat på detta system.\n\n")
  197.             (set #NList_new "Version att installera: 17.53\n")
  198.             (set #NList_help "Kopierar MUI-klassen NListTree.mcc till Mui:libs/mui/")
  199.             (set #NListCopy "Kopiera MUI-klassen NListTree.mcc till Mui:libs/mui/NListTree.mcc?\n\n")
  200.             (set #NListCopy-1 (cat "Japp"))
  201.             (set #NLIstCopy-2 (cat "Aldrig i livet!"))
  202.             (set #cat_help "Vilket språk vill du använda?")
  203.             (set #cat "catalogs")
  204.             (set #catDE "catalogs/deutsch")
  205.             (set #catFR "catalogs/français")
  206.             (set #catSW "catalogs/svenska")
  207.             (set #catEN "catalogs/english")
  208.             (set #whichicon "Vilken sorts ikoner vill du installera?")
  209.             (set #glow1 "Glowicons / Oldstyle")
  210.             (set #glow2 "Newicons")
  211.             (set #cat1 "tyska")
  212.             (set #cat2 "franska")
  213.             (set #cat3 "svenska")
  214.             (set #cat4 "engelska")
  215.             (set #icon1 "ikon 1")
  216.             (set #icon2 "ikon 2")
  217.             (set #icon3 "ikon 3")
  218.             (set #icon4 "ikon 4")
  219.             (set #NList_version (getversion "mui:libs/mui/NListTree.mcc"))
  220.             (set #NList_ver (/ #NList_version 65536))
  221.             (set #NList_rev (- #NList_version (* #NList_ver 65536)))
  222.             (set #NList_text (cat "\nRedan installerad version:" #NList_ver"."#NList_rev))
  223.           )
  224.           (
  225.  
  226.            (set #minInst43 "You need at least Installer version 43 or better\nto install AmiTradeCenter. Where are u from? ;)")
  227.            (set #askdir "Where do you want to install ATC?\nA new drawer `AmiTradeCenter` will be created...somehow ;)")
  228.            (set #askdir1 "Where is ATC located on your System?\nSelect the whole path, incl. /AmiTradeCenter, please!")
  229.            (set #asl_help "Select the Path where ATC is already installed.")
  230.            (set #makedir_help "Creating directory..")
  231.            (set #firstmessage (cat "\nHello and welcome to AmiTradeCenter, the FTP-Client for Amiga Computers. The ATC-Development-Council(tm) wishes you a lot of fun while using this software. You should take a moment to read the manual if you encounter unexpected problems or a function seem to be strange for you ;-)"))
  232.            (set #lastmessage (cat "\nInstallation worked without problems (a miracle if you ask me..), you can now start ATC. In order to use ATC as soon as possible the window (on the Workbench) where ATC was installed is opened already. You have the possibility to study the guide after you have clicked the proceed button."))
  233.            (set #copyfiles "Copy files..")
  234.            (set #copy_help "Copy files..")
  235.            (set #yourchoice "Which icon would you like to use?")
  236.            (set #your_help "You have to use this icon with ATC every day. Better think twice! ;)")
  237.            (set #showguide (cat "\n\nWhich ATC-guide do you want to study now?\n"))
  238.            (set #guide_help "If you can`t read, ignore this section ;)")
  239.            (set #showguide-1 (cat "For sure.."))
  240.            (set #showguide-2 (cat "Not really.."))
  241.            (set #guideD "docs/AmiTradeCenter_D.guide")
  242.            (set #guideE "docs/AmiTradeCenter_E.guide")
  243.            (set #none "Erm, none of course! ;)")
  244.            (set #installchoice "\nHow do you want ATC to be installed?\n")
  245.            (set #inst_help "\nHow do you want ATC to be installed?\n")
  246.            (set #detect "\nAmiTradeCenter is already- installed on this System.\n\n")
  247.            (set #NList_new "Version to Install: 17.53\n")
  248.            (set #NList_help "Copy MUI-Class NListTree.mcc to Mui:libs/mui/")
  249.            (set #NListCopy "Copy MUI-Class NListTree.mcc to Mui:libs/mui/NListTree.mcc ?\n\n")
  250.            (set #NListCopy-1 (cat "Jups"))
  251.            (set #NLIstCopy-2 (cat "Hell, NO!"))
  252.            (set #cat_help "Which language do you want to use?")
  253.            (set #cat "catalogs")
  254.            (set #catDE "catalogs/deutsch")
  255.            (set #catFR "catalogs/français")
  256.            (set #catSW "catalogs/svenska")
  257.            (set #catEN "catalogs/english")
  258.            (set #whichicon "What kind of icons do you want to install?")
  259.            (set #glow1 "Glowicons / Oldstyle")
  260.            (set #glow2 "Newicons")
  261.            (set #cat1 "german")
  262.            (set #cat2 "french")
  263.            (set #cat3 "swedish")
  264.            (set #cat4 "english")
  265.            (set #icon1 "Pictogram 1")
  266.            (set #icon2 "Pictogram 2")
  267.            (set #icon3 "Pictogram 3")
  268.            (set #icon4 "Pictogram 4")
  269.            (set #NList_version (getversion "mui:libs/mui/NListTree.mcc"))
  270.            (set #NList_ver (/ #NList_version 65536))
  271.            (set #NList_rev (- #NList_version (* #NList_ver 65536)))
  272.            (set #NList_text (cat "\nAlready installed version:" #NList_ver"."#NList_rev))
  273.           )
  274.         )
  275.       )
  276.     )
  277.   )
  278. )
  279.  
  280. (procedure atc_askguide
  281.   (if (>= (/ @installer-version 65536) 44)
  282.     (
  283.       (closemedia installpic)
  284.       (closemedia installpic-2)
  285.  
  286.       (set #guidelanguage
  287.         (askchoice
  288.           (prompt #showguide)
  289.           (help #guide_help)
  290.           (choices #cat1 #cat4 #none)
  291.             (if (= #language "deutsch")
  292.               (default 0)
  293.               (default 1)
  294.             )
  295.         )
  296.       )
  297.  
  298.       (if (<> #guidelanguage 2)
  299.         (
  300.           (if (= #guidelanguage 0)
  301.             (set #guideondisk (tackon @default-dest #guideD))
  302.             (set #guideondisk (tackon @default-dest #guideE))
  303.           )
  304.           (showmedia 'media' #guideondisk 'upper_left' 'medium_large' 1 'wordwrap' 'panel')
  305.         )
  306.       )
  307.     
  308.       (set wbobj (tackon destpath @default-dest))
  309.       (openwbobject wbobj)
  310.     )
  311.   ) 
  312. ) ;endproc
  313.  
  314.  
  315. (procedure atc_firstnote
  316.   (message #firstmessage)
  317. ) ;endproc
  318.  
  319. (procedure atc_lastnote
  320.   (if (>= (/ @installer-version 65536) 44)
  321.     (message #lastmessage)
  322.   )
  323. ) ;endproc
  324.  
  325.  
  326. (procedure atc_copyicons
  327.   (if (>= (/ @installer-version 65536) 44)
  328.     (
  329.       (if (= #iconchoice 0)
  330.         (if (= #glowicon 1)
  331.           (
  332.             (set result
  333.               (copyfiles
  334.                 (source (cat "icons/AmiTradeCenterNI1.info"))
  335.                 (dest @default-dest)
  336.                 (newname (cat "AmiTradeCenter.info"))
  337.                 (optional "nofail" "force" "askuser")
  338.               )
  339.             )
  340.  
  341.             (set result
  342.               (copyfiles
  343.                 (source (cat "icons/AmiTradeCenterNI1.info"))
  344.                 (dest @default-dest)
  345.                 (newname (cat "ATCTrader.info"))
  346.                 (optional "nofail" "force" "askuser")
  347.               )
  348.             )
  349.           )
  350.         )
  351.       )
  352.  
  353.       (if (= #iconchoice 1)
  354.         (if (= #glowicon 1)
  355.           (
  356.             (set result
  357.               (copyfiles
  358.                 (source (cat "icons/AmiTradeCenterSmallNI1.info"))
  359.                 (dest @default-dest)
  360.                 (newname (cat "AmiTradeCenter.info"))
  361.                 (optional "nofail" "force" "askuser")
  362.               )
  363.             )
  364.             (set result
  365.               (copyfiles
  366.                 (source (cat "icons/AmiTradeCenterSmallNI1.info"))
  367.                 (dest @default-dest)
  368.                 (newname (cat "ATCTrader.info"))
  369.                 (optional "nofail" "force" "askuser")
  370.               )
  371.             )
  372.           )
  373.           (
  374.             (set result
  375.               (copyfiles
  376.                 (source (cat "icons/AmiTradeCenterSmall1.info"))
  377.                 (dest @default-dest)
  378.                 (newname (cat "AmiTradeCenter.info"))
  379.                 (optional "nofail" "force" "askuser")
  380.               )
  381.             )
  382.             (set result
  383.               (copyfiles
  384.                 (source (cat "icons/AmiTradeCenterSmall1.info"))
  385.                 (dest @default-dest)
  386.                 (newname (cat "ATCTrader.info"))
  387.                 (optional "nofail" "force" "askuser")
  388.               )
  389.             )
  390.           )
  391.         )
  392.       )
  393.  
  394.       (if (= #iconchoice 2)
  395.         (if (= #glowicon 1)
  396.           (
  397.             (set result
  398.               (copyfiles
  399.                 (source (cat "icons/3new.info"))
  400.                 (dest @default-dest)
  401.                 (newname (cat "AmiTradeCenter.info"))
  402.                 (optional "nofail" "force" "askuser")
  403.               )
  404.             )
  405.  
  406.             (set result
  407.               (copyfiles
  408.                 (source (cat "icons/3new.info"))
  409.                 (dest @default-dest)
  410.                 (newname (cat "ATCTrader.info"))
  411.                 (optional "nofail" "force" "askuser")
  412.               )
  413.             )
  414.           )
  415.           (
  416.             (set result
  417.               (copyfiles
  418.                 (source (cat "icons/3glow.info"))
  419.                 (dest @default-dest)
  420.                 (newname (cat "AmiTradeCenter.info"))
  421.                 (optional "nofail" "force" "askuser")
  422.               )
  423.             )
  424.  
  425.             (set result
  426.               (copyfiles
  427.                 (source (cat "icons/3glow.info"))
  428.                 (dest @default-dest)
  429.                 (newname (cat "ATCTrader.info"))
  430.                 (optional "nofail" "force" "askuser")
  431.               )
  432.             )
  433.           )
  434.         )
  435.       )
  436.  
  437.       (if (= #iconchoice 3)
  438.         (if (= #glowicon 1)
  439.           (
  440.             (set result
  441.               (copyfiles
  442.                 (source (cat "icons/4new.info"))
  443.                 (dest @default-dest)
  444.                 (newname (cat "AmiTradeCenter.info"))
  445.                 (optional "nofail" "force" "askuser")
  446.               )
  447.             )
  448.             (set result
  449.               (copyfiles
  450.                 (source (cat "icons/4new.info"))
  451.                 (dest @default-dest)
  452.                 (newname (cat "ATCTrader.info"))
  453.                 (optional "nofail" "force" "askuser")
  454.               )
  455.             )
  456.           )
  457.           (
  458.             (set result
  459.               (copyfiles
  460.                 (source (cat "icons/4glow.info"))
  461.                 (dest @default-dest)
  462.                 (newname (cat "AmiTradeCenter.info"))
  463.                 (optional "nofail" "force" "askuser")
  464.               )
  465.             )
  466.             (set result
  467.               (copyfiles
  468.                 (source (cat "icons/4glow.info"))
  469.                 (dest @default-dest)
  470.                 (newname (cat "ATCTrader.info"))
  471.                 (optional "nofail" "force" "askuser")
  472.               )
  473.             )
  474.           )
  475.         )
  476.       )
  477.  
  478.       (if (= #glowicon 0) ; now install other icons
  479.         (
  480.           (copyfiles
  481.             (source (cat "Utilities.info"))
  482.             (dest destpath)
  483.             (newname (cat "AmiTradeCenter.info"))
  484.             (optional "nofail" "force" "askuser")
  485.           )
  486.         )
  487.         (
  488.           (copyfiles
  489.             (source (cat "icons/Docs.info"))
  490.             (dest @default-dest)
  491.             (newname (cat "Docs.info"))
  492.             (optional "nofail" "force" "askuser")
  493.           )
  494.           (copyfiles
  495.             (source (cat "icons/atcdrawer.info"))
  496.             (dest @default-dest)
  497.             (newname (cat "Utilities.info"))
  498.             (optional "nofail" "force" "askuser")
  499.           )
  500.           (copyfiles
  501.             (source (cat "icons/Changes.txt.info"))
  502.             (dest @default-dest)
  503.             (optional "nofail" "force" "askuser")
  504.           )
  505.           (set #newguide "Docs")
  506.           (copyfiles
  507.             (source (cat "icons/AmiTradeCenter_GuideNI.info"))
  508.             (dest (tackon @default-dest #newguide))
  509.             (newname (cat "AmiTradeCenter_D.guide.info"))
  510.             (optional "nofail" "force" "askuser")
  511.           )
  512.           (copyfiles
  513.             (source (cat "icons/AmiTradeCenter_GuideNI.info"))
  514.             (dest (tackon @default-dest #newguide))
  515.             (newname (cat "AmiTradeCenter_E.guide.info"))
  516.             (optional "nofail" "force" "askuser")
  517.           )
  518.           (copyfiles
  519.             (source (cat "icons/atcdrawer.info"))
  520.             (dest destpath)
  521.             (newname (cat "AmiTradeCenter.info"))
  522.             (optional "nofail" "force" "askuser")
  523.           )
  524.         )
  525.       )
  526.     )
  527.     ( ; old installer will install this icon silently
  528.       (if (= #glowicon 0)
  529.         (
  530.           (copyfiles
  531.             (source (cat "Utilities.info"))
  532.             (dest destpath)
  533.             (newname (cat "AmiTradeCenter.info"))
  534.             (optional "nofail" "force" "askuser")
  535.           )
  536.         )
  537.         (
  538.           (copyfiles
  539.             (source (cat "icons/AmiTradeCenterNI1.info"))
  540.             (dest @default-dest)
  541.             (newname (cat "AmiTradeCenter.info"))
  542.             (optional "nofail" "force" "askuser")
  543.           )
  544.           (copyfiles
  545.             (source (cat "icons/AmiTradeCenterSmallNI1.info"))
  546.             (dest @default-dest)
  547.             (newname (cat "ATCTrader.info"))
  548.             (optional "nofail" "force" "askuser")
  549.           )
  550.           (copyfiles
  551.             (source (cat "icons/Docs.info"))
  552.             (dest @default-dest)
  553.             (newname (cat "Docs.info"))
  554.             (optional "nofail" "force" "askuser")
  555.           )
  556.           (copyfiles
  557.             (source (cat "icons/atcdrawer.info"))
  558.             (dest @default-dest)
  559.             (newname (cat "Utilities.info"))
  560.             (optional "nofail" "force" "askuser")
  561.           )
  562.           (copyfiles
  563.             (source (cat "icons/Changes.txt.info"))
  564.             (dest @default-dest)
  565.             (optional "nofail" "force" "askuser")
  566.           )
  567.  
  568.           (set #newguide "Docs")
  569.           (copyfiles
  570.             (source (cat "icons/AmiTradeCenter_GuideNI.info"))
  571.             (dest (tackon @default-dest #newguide))
  572.             (newname (cat "AmiTradeCenter_D.guide.info"))
  573.             (optional "nofail" "force" "askuser")
  574.           )
  575.           (copyfiles
  576.             (source (cat "icons/AmiTradeCenter_GuideNI.info"))
  577.             (dest (tackon @default-dest #newguide))
  578.             (newname (cat "AmiTradeCenter_E.guide.info"))
  579.             (optional "nofail" "force" "askuser")
  580.           )
  581.           (copyfiles
  582.             (source (cat "icons/atcdrawer.info"))
  583.             (dest destpath)
  584.             (newname (cat "AmiTradeCenter.info"))
  585.             (optional "nofail" "force" "askuser")
  586.           )
  587.         )
  588.       )
  589.     )
  590.   )
  591. ) ;endproc
  592.  
  593.  
  594. (procedure atc_askcatalogs
  595.   (set #catchoice
  596.     (askchoice
  597.       (prompt #cat_help)
  598.       (help #cat_help)
  599.       (choices #cat1 #cat2 #cat3 #cat4)
  600.       (if (= #language "deutsch")
  601.         (default 0)
  602.         (
  603.           (if (= #language "français")
  604.             (default 1)
  605.             (
  606.               (if (= #language "svenska")
  607.                  (default 2)
  608.                (
  609.                  (default 3)
  610.                )
  611.               )
  612.             )
  613.           )
  614.         )
  615.       )
  616.     )
  617.   )
  618. ) ;endproc
  619.  
  620. (procedure atc_asksortoficons
  621.   (set #glowicon
  622.     (askchoice
  623.       (prompt #whichicon)
  624.       (help #whichicon)
  625.       (choices #glow1 #glow2)
  626.       (default 0)
  627.     )
  628.   )
  629. ) ;endproc
  630.  
  631. (procedure atc_askiconset
  632.   (set #iconchoice
  633.     (askchoice
  634.       (prompt #yourchoice)
  635.       (help #your_help)
  636.       (choices #icon1 #icon2 #icon3 #icon4)
  637.       (default 0)
  638.     )
  639.   )
  640. ) ;endproc
  641.  
  642. (procedure atc_checkprofiles
  643.   (set #profiles ".profiles")
  644.   (set #profilter (tackon @default-dest #profiles))
  645.     (if (exists #profilter)
  646.       (set #pattern "~(#?profiles|#?config|#?install#?|#?mui#?|#?adtfilt#?|#?catalogs#?|#?pictures#?)")
  647.       (set #pattern "~(#?install#?|#?mui#?|#?catalogs#?|#?pictures#?)")
  648.     )
  649. ) ;endproc
  650.  
  651.  
  652. (procedure atc_copyfiles
  653.   (set result
  654.     (copyfiles
  655.       (prompt #copyfiles)
  656.       (help #copy_help)
  657.       (source "")
  658.       (dest @default-dest)
  659.       (pattern #pattern)
  660.       (optional fail)
  661.       (safe)
  662.     )
  663.   )
  664. ) ;endproc
  665.  
  666. (procedure atc_copycatalogs
  667.   (if (= #catchoice 0)
  668.     (
  669.       (set #catdir (tackon @default-dest #cat))
  670.       (set #catdirlanguage (tackon @default-dest #catDE))
  671.  
  672.       (set result
  673.         (makedir #catdir
  674.           (prompt #makedir_help)
  675.           (safe)
  676.         )
  677.       )
  678.  
  679.       (set result
  680.         (makedir #catdirlanguage
  681.           (prompt #makedir_help)
  682.           (safe)
  683.         )
  684.       )
  685.  
  686.       (set result
  687.         (copyfiles
  688.           (source (cat "catalogs/deutsch/"))
  689.           (dest #catdirlanguage)
  690.           (pattern "#?")
  691.           (optional "nofail" "force" "askuser")
  692.         )
  693.       )
  694.     )
  695.   )     
  696.  
  697.   (if (= #catchoice 1)
  698.     (
  699.       (set #catdir (tackon @default-dest #cat))
  700.       (set #catdirlanguage (tackon @default-dest #catFR))
  701.  
  702.       (set result
  703.         (makedir #catdir
  704.           (prompt #makedir_help)
  705.           (safe)
  706.         )
  707.       )
  708.  
  709.       (set result
  710.         (makedir #catdirlanguage
  711.           (prompt #makedir_help)
  712.           (safe)
  713.         )
  714.       )
  715.  
  716.  
  717.       (set result
  718.         (copyfiles
  719.           (source (cat "catalogs/français/"))
  720.           (dest #catdirlanguage)
  721.           (pattern "#?")
  722.           (optional "nofail" "force" "askuser")
  723.         )
  724.       )
  725.     )
  726.   )     
  727.  
  728.  
  729.   (if (= #catchoice 2)
  730.     (
  731.       (set #catdir (tackon @default-dest #cat))
  732.       (set #catdirlanguage (tackon @default-dest #catSW))
  733.  
  734.       (set result
  735.         (makedir #catdir
  736.           (prompt #makedir_help)
  737.           (safe)
  738.         )
  739.       )
  740.  
  741.       (set result
  742.         (makedir #catdirlanguage
  743.           (prompt #makedir_help)
  744.           (safe)
  745.         )
  746.       )
  747.  
  748.  
  749.       (set result
  750.         (copyfiles
  751.           (source (cat "catalogs/svenska/"))
  752.           (dest #catdirlanguage)
  753.           (pattern "#?")
  754.           (optional "nofail" "force" "askuser")
  755.         )
  756.       )
  757.     )
  758.   )     
  759.  
  760.   (set #catdir (tackon @default-dest #cat))
  761.  
  762.   (set result
  763.     (makedir #catdir
  764.       (prompt #makedir_help)
  765.       (safe)
  766.     )
  767.   )
  768.  
  769.   (set result
  770.     (copyfiles
  771.       (source (cat "catalogs/"))
  772.       (dest #catdir)
  773.       (pattern "#?.cd")
  774.       (optional "nofail" "force" "askuser")
  775.     )
  776.   )
  777. ) ;endproc
  778.  
  779. (procedure openscreen
  780.   (if (>= (/ @installer-version 65536) 44)
  781.     (
  782.       (effect "lower_center" "radial" $00000E  $00010E0)
  783.       (set #h (querydisplay "screen" "height"))
  784.       (set #w (querydisplay "screen" "width"))
  785.       (set #d (querydisplay "screen" "depth"))
  786.       (set #c (querydisplay "screen" "colors"))
  787.     )
  788.   )
  789.  
  790.   (set #installicons "icons1.jpg")
  791.   (set #installicons-2 "icons2.jpg")
  792.   (set #installicons-3 "install.jpg")
  793.   (set #iconchoice 4)
  794.  
  795.   (if (>= (/ @installer-version 65536) 44)
  796.     (showmedia 'installpic-3' (tackon "icons" #installicons-3) 'upper_right' 'none' 0)
  797.   )
  798. ) ;endproc
  799.  
  800.  
  801.  
  802. (if (< (/ @installer-version 65536) 43)
  803.   (abort #minInst43)
  804. )
  805.  
  806.  
  807. (complete 0)
  808.  
  809. (if (exists "env:mui/AMITRADECENTER.1.cfg")
  810.   (set #isatc 1)
  811.   (set #isatc 0)
  812. )
  813.  
  814. (if (exists "env:ATC_Path")
  815.   (set #atc_path (getenv "ATC_Path"))
  816.   (set #atc_path "work:")
  817. )
  818.  
  819. (if (exists ".config")
  820.   (set #update 0)
  821.   (set #update 1)
  822. )
  823.  
  824. (openscreen)
  825.  
  826. (if (= #update 0)
  827.   (
  828.     (set #choice1 "Install ATC")
  829.     (set #choice2 "Update ATC")
  830.  
  831.      (set #inchoice
  832.        (askchoice
  833.          (if (= #isatc 1)
  834.            (
  835.              (prompt #detect)
  836.              (help #detect)
  837.            )
  838.            (
  839.              (prompt #installchoice)
  840.              (help #inst_help)
  841.            )
  842.          )
  843.          (choices #choice1 #choice2)
  844.          (default #isatc)
  845.        )
  846.      )
  847.  
  848.      (if (= #inchoice 0)
  849.        (
  850.          (atc_firstnote)
  851.          (set destpath
  852.            (askdir
  853.              (prompt #askdir)
  854.              (help #asl_help)
  855.              (default "work:")
  856.            )
  857.          )
  858.  
  859.          (set @default-dest
  860.            (tackon destpath "AmiTradeCenter")
  861.          )
  862.  
  863.          (set result
  864.            (makedir @default-dest
  865.              (prompt #makedir_help)
  866.              (safe)
  867.            )
  868.          )
  869.  
  870.          (complete 5)
  871.  
  872.          (atc_askcatalogs)
  873.          (atc_asksortoficons)
  874.  
  875.  
  876.          (if (>= (/ @installer-version 65536) 44)
  877.            (
  878.              (showmedia 'installpic' (tackon "icons" #installicons) 'upper_left' 'none' 0)
  879.              (showmedia 'installpic-2' (tackon "icons" #installicons-2) 'upper_center' 'none' 0)
  880.              (atc_askiconset)
  881.            )
  882.          )
  883.  
  884. ;         (if (askbool
  885. ;           (prompt #NListCopy #NList_new #NList_text)
  886. ;           (help #NList_help)
  887. ;           (choices #NListCopy-1 #NListCopy-2)
  888. ;           (default 1)
  889. ;         )
  890. ;          (
  891. ;            (set result
  892. ;              (copyfiles
  893. ;                (source (cat "mui/libs/mui/NListtree.mcc"))
  894. ;                (dest "mui:libs/mui/")
  895. ;                (newname (cat "NListtree.mcc"))
  896. ;                (optional "nofail" "force" "askuser")
  897. ;              )
  898. ;            )
  899. ;           )
  900. ;         )
  901.          (atc_checkprofiles)
  902.          (set #pattern "~(#?install#?|#?mui#?|#?catalogs#?|#?icons#?)")
  903.          (atc_copyfiles)
  904.          (complete 95)
  905.          (atc_copycatalogs)
  906.          (atc_copyicons)
  907.          (atc_lastnote)
  908.          (atc_askguide)
  909.        )
  910.        ( ; update
  911.          (set destpath
  912.            (askdir
  913.              (prompt #askdir1)
  914.              (help #asl_help)
  915.              (default #atc_path)
  916.            )
  917.          )
  918.  
  919.          (set @default-dest destpath)
  920.  
  921.          (set #filter ".adtfilter")
  922.   
  923.          (set #adtfilter
  924.             (tackon @default-dest #filter)
  925.          )
  926.  
  927.          (if (exists #adtfilter)
  928.            (set #pattern "~(#?profiles|#?config|#?icon#?|#?.info|#?mui#?|#?install#?|.adtfilt#?|#?catalogs#?|#?pictures#?)")
  929.            (set #pattern "~(#?profiles|#?config|#?icon#?|#?.info|#?mui#?|#?install#?|#?catalogs#?|#?pictures#?)")
  930.          )
  931.  
  932.          (set #catchoice
  933.            (askchoice
  934.              (prompt #cat_help)
  935.              (help #cat_help)
  936.              (choices #cat1 #cat2 #cat3 #cat4)
  937.                (if (= #language "deutsch")
  938.                    (default 0)
  939.                  (
  940.                    (if (= #language "français")
  941.                        (default 1)
  942.                      (
  943.                        (if (= #language "svenska")
  944.                          (
  945.                            (default 2)
  946.                          )
  947.                          (
  948.                            (default 3)
  949.                          )
  950.                        )
  951.                      )
  952.                    )
  953.                  )
  954.                )
  955.            )
  956.          )
  957.  
  958.  
  959.          (set result
  960.            (copyfiles
  961.              (prompt #copyfiles)
  962.              (help #copy_help)
  963.              (source "")
  964.              (dest destpath)
  965.              (pattern #pattern)
  966.              (optional fail)
  967.              (safe)
  968.            )
  969.          )
  970.  
  971.          (atc_copycatalogs)
  972.        )
  973.   )
  974. )
  975.  
  976. (if (= #update 1)
  977.   (
  978.     (set destpath
  979.       (askdir
  980.         (prompt #askdir1)
  981.         (help #asl_help)
  982.         (default #atc_path)
  983.       )
  984.     )
  985.  
  986.     (set @default-dest destpath)
  987.  
  988.     (set #filter ".adtfilter")
  989.  
  990.     (set #adtfilter
  991.        (tackon @default-dest #filter)
  992.     )
  993.  
  994.     (if (exists #adtfilter)
  995.       (set #pattern "~(#?profiles|#?config|#?icon#?|#?.info|#?mui#?|#?install#?|.adtfilt#?|#?catalogs#?|#?pictures#?)")
  996.       (set #pattern "~(#?profiles|#?config|#?icon#?|#?.info|#?mui#?|#?install#?|#?catalogs#?|#?pictures#?)")
  997.     )
  998.  
  999.  
  1000.     (set #catchoice
  1001.       (askchoice
  1002.         (prompt #cat_help)
  1003.         (help #cat_help)
  1004.         (choices #cat1 #cat2 #cat3 #cat4)
  1005.           (if (= #language "deutsch")
  1006.               (default 0)
  1007.             (
  1008.               (if (= #language "français")
  1009.                   (default 1)
  1010.                 (
  1011.                   (if (= #language "svenska")
  1012.                     (
  1013.                       (default 2)
  1014.                     )
  1015.                     (
  1016.                       (default 3)
  1017.                     )
  1018.                   )
  1019.                 )
  1020.               )
  1021.             )
  1022.           )
  1023.       )
  1024.     )
  1025.  
  1026.     (complete 10)
  1027.  
  1028.     (set result
  1029.       (copyfiles
  1030.         (prompt #copyfiles)
  1031.         (help #copy_help)
  1032.         (source "")
  1033.         (dest destpath)
  1034.         (pattern #pattern)
  1035.         (optional fail)
  1036.         (safe)
  1037.       )
  1038.     )
  1039.  
  1040.     (complete 97)
  1041.     (atc_copycatalogs)
  1042.  
  1043.     )
  1044.   ) 
  1045. )
  1046.  
  1047. (complete 100)
  1048. ; hey, the pain is over... pardy on garth!
  1049.